package com.trg.flex.messages
{
	import mx.rpc.Fault;
	
	public class ErrorConvertor
	{
		/*
		public static const UNKNOWN:int = 0,
							DATA_INTEGRITY_VIOLATION:int = 1,
							SECURITY_VIOLATION:int = 2,
							CONNECTION_ISSUE:int = 3,
							TEMPORARY_SERVER_FAILURE:int = 4;
		
		
		public static function getErrorCode(error:Error):int {
			
			if (err is Fault && Fault(err).faultString.indexOf("org.springframework.dao.DataIntegrityViolationException :") == 0) {
				return DATA_INTEGRITY_VIOLATION;
			else if (err is Fault && Fault(err).faultCode == "Client.Error.RequestTimeout") {
				return CONNECTION_ISSUE;
			} else {
				return UNKNOWN;
			}
			
		}
		*/
	}
}